﻿namespace GameFramework
{
    /// <summary>
    /// 游戏框架错误码
    /// </summary>
    public enum GameFrameworkErrorCode
    {
        /// <summary>
        /// 成功
        /// </summary>
        Success = 0,

        /// <summary>
        /// 应答包类型不匹配
        /// </summary>
        ResponseTypeNotMatch = 1001,

        /// <summary>
        /// 应答包为空
        /// </summary>
        ResponseIsNull,

        /// <summary>
        /// 请求捕获到异常
        /// </summary>
        RequestCatchException,
        
        /// <summary>
        /// 请求已被取消
        /// </summary>
        RequestHasBeenCanceled,

        #region [UI服务错误码 2001]

        /// <summary>
        /// UI视图被关闭
        /// </summary>
        UIHasBeenClosed = 2001,
        
        /// <summary>
        /// UI资源加载失败
        /// </summary>
        UIResourceLoadFailed,
        
        /// <summary>
        /// UI组未定义
        /// </summary>
        UIGroupUndefined,
        
        /// <summary>
        /// UI界面未定义
        /// </summary>
        UIFormUndefined,
        
        /// <summary>
        /// UI请求 - 界面被关闭
        /// </summary>
        UIRequestFormClosed,
        
        /// <summary>
        /// UI请求 - 请求被覆盖
        /// </summary>
        UIRequestOverride,
        
        /// <summary>
        /// UI请求 - 请求类型无效
        /// </summary>
        UIRequestTypeInvalid,

        #endregion

        #region [路由服务错误码 3001]

        /// <summary>
        /// 未定义的路由
        /// </summary>
        RouteUndefined = 3001,
        
        /// <summary>
        /// 路由格式错误
        /// </summary>
        RouteFormatError,
        
        /// <summary>
        /// 路由不可为空的参数未定义
        /// </summary>
        RouteNotNullParameterUndefined,
        
        /// <summary>
        /// 路由参数类型不匹配
        /// </summary>
        RouteParameterTypeNotMatch,

        #endregion

        /// <summary>
        /// 框架错误码的最大值
        /// </summary>
        Max = 1000000,
    }
}